The invention is generally related to computers and computer software. More specifically, the invention is generally related to programming languages and computer management of logical entities such as objects and the like.
Translating human knowledge into computerized form to enable a computer to perform a useful task is a difficult problem that has existed since the advent of computers. Humans tend to think in terms of abstract concepts and the meanings behind such concepts, while computers are more literal in nature, expecting specific inputs and outputting specific responses to such inputs. To bridge the gap between humans that desire to perform tasks, and the computers that ultimately perform those tasks, often skilled program developers are required to develop computer programs that minimize the level of skill required by end users. Whereas at the beginning of the computer revolution, computer programs were rudimentary in nature, and required extensive skill on the part of end users, computer technology has now evolved to the point that computer programs are much more complex, often making computers much simpler to use. In addition, new development tools are constantly being developed to relieve the burden on developers so that, rather than having to construct a computer program from the ground up, the developer can rely on pre-existing components to impart high-level functionality to a computer program.
As a result of these advancements, the level of skill required to both develop and use computer programs continues to decrease. Consequently, computer technology has become more useful to a wider number of people. A need still continues to exist, however, for a manner of further simplifying the control of computers in performing useful tasks.
Computer programs are generally developed based upon computer languages, which essentially permit humans to develop computer programs in more human-centric manner. Computer languages typically exist only in the abstract; however, the concepts of the languages are implemented in software that is used in the development and execution of computer programs that follow the xe2x80x9crulesxe2x80x9d defined by the languages.
The ultimate goal of any computer language, as well as the underlying software that implements the computer language, is to simplify the development of computer programs. As such, the value of a computer language is generally gauged based on the ease in which the language can be used by a program developer to create new programs, or to modify existing programs to suit their needs. The ease of use of a computer language is typically dependent on the often competing goals of expressiveness and intuitiveness.
The expressiveness of a computer language represents the ability for a language to express different concepts in terms suitable for execution on a computer. In essence, the more expressive a language is, the greater the functionality and flexibility of the language.
Intuitiveness, on the other hand, reflects the ease in which abstract, human-centric concepts can be represented by a language. When a language is easier to understand, the learning curve associated with developing programs in that language is lower, as is the required level of skill for a developer.
One aspect of a computer language that weighs heavily on the expressiveness and intuitiveness of the language is the number and types of core semantic elements used by the language. In particular, despite the wide differences in computer languages, at the very essence, every computer language relies on a set of core semantic entities that represent the basic xe2x80x9cwordsxe2x80x9d for the language. Just as the words in a dictionary form the core elements for the English language from which all communication in the English language is derived, the core semantic entities for a computer language are the basic elements from which all programmatic concepts are constructed.
As the number of core semantic elements used in a language increases, in general the expressiveness of the language increases, while the intuitiveness decreases. In a low-level and rudimentary language such as machine language, for example, the basic core language entities are typically the actual microprocessor instructions executed by the computer, which are rarely intuitive to humans. More complex and abstract object-oriented programming languages such as c++ come closer to providing intuitiveness, but these languages are also quite large, offering dozens if not hundreds of key semantic entities, many of which are very low level and still require extensive effort on the part of individual developers to support more abstract concepts.
At the opposite end of the spectrum, some languages such as LISP and SELF have been defined with a restricted number of basic semantic entities. For LISP, as an example, only two basic semantic entities are supported: lists and list elements. In SELF, the basic semantic entities are objects and slots. It has been found, however, that having too few basic entities also compromises expressiveness, as some conceptual constructs may not be capable of being represented in literal computer instructions. Often, intuitiveness is also hampered because the logical leap necessary to represent conceptual constructs using only a few semantic entities may be too great for an inexperienced developer.
Therefore, a significant need continues to exist in the art for a computer language that implements a more useful set of core semantic entities that is capable of providing greater expressiveness and intuitiveness than is available from conventional computer languages.
Another aspect associated with simplifying the development process of computer programs is the ease in which programs can be transitioned from the development stage to the execution stage. For example, many computer languages utilize separate development and runtime environments. In the development environment, a developer writes a program in a source code representation and compiles the program into an executable representation. The runtime environment is used to execute the program, and may include debug capabilities to permit the developer to identify errors in the program. A developer must switch between the environments to revise a program and eliminate any errors found during debugging. Such separation of development and runtime environments, however, often complicates the development process.
Other languages support integrated development and runtime environments, whereby development of a program, as well as execution of the program, can be performed in the same environment. As a result, task switching between separate environments is eliminated, often streamlining the development process.
Furthermore, regardless of whether development and runtime environments are integrated, both environments are subject to concerns as to efficiently managing information in a computer environment, particularly in those environments that rely on an underlying database application.
Inheritance, for example, is a central mechanism of object oriented software engineering. Inheritance supports reuse, by placing common fields and behaviors into a xe2x80x9cparentxe2x80x9d entity. These common elements are then inherited into one or more xe2x80x9cchildxe2x80x9d entities. This reduces the amount of work required to define the child entities, since the common elements only need to be defined one time in the parent, rather than defined separately for each child. As a result, the likelihood of error is reduced; and if an error is made in defining the common elements, the error only needs to be fixed in one place, on the parent, rather than needing to be fixed many times. The result is that systems using inheritance are generally less expensive to build and to maintain.
A common problem facing inheritance is that of restricting the inheritance of certain elements. During development of real-world systems, parent entities often hold information or behaviors that should not be inherited into children. These fields are often used for bookkeeping, such as tracking the number of instances of a particular class, or keeping a list of all such instances. Existing object oriented languages support the ability to restrict inheritance, for example, through the use of xe2x80x9cprivatexe2x80x9d elements, which are physically inherited into child classes (that is, increase the physical size of the child class), but which cannot be accessed (neither read nor modified) by the child.
One limitation of existing inheritance restriction methods is that they are designed to work with objects in memory, and do not directly support the persistence of information in a database. Changing which fields are to be restricted from being inherited in a database, whether a relational or an object-oriented database, would require changing the database schema, which can be an expensive undertaking, potentially requiring that the affected databases be taken off-line. In fact, relational databases do not natively support inheritance whatsoever, and require special application logic to mimic inheritance functionality.
Therefore, a need exists in the art for a manner of restricting the inheritance of fields and other parameters of an object-oriented entity, in particular in applications that rely on underlying databases and the persistent storage of object-oriented entities.
The invention addresses these and other problems associated with the prior art by providing an apparatus, program product, and method of managing entities in an object-oriented environment in which parameters or fields are selectively inherited from parent entities and into child entities responsive to persistent indications of the inheritability of such parameters or fields stored in a non-volatile memory. Further, in many implementations, basing a determination of inheritability on such persistent information permits inheritance to be selectively restricted for a parameter or field without requiring any changes to the database schema for a database that controls access to the parent and child entities.
Consistent with the invention, entities from an object-oriented environment in a computer system are managed by creating a child entity based on a parent entity for which a persistent representation has been created in a non-volatile memory in the computer system. Further, the non-volatile memory is accessed to determine whether a parameter for the parent entity is inheritable. In addition, the parameter is inherited into the child entity if the parameter for the parent entity is determined to be inheritable.